// ex5_1.cpp: sum1 of num1 to num2.
#include <iostream>

int main(void)
{
    using namespace std;
    cout << "Enter two integers: num1  num2: \n";
    int num1, num2, sum1 = 0;
    cout << "num1: ";
    cin >> num1;
    cout << "num2: ";
    cin >> num2;

    for (int i = num1; i <= num2; i++)
    {
        sum1 += i;
        cout << "i = " << i << " sum1 = " << sum1 << endl;
    }
    cout << "finally sum1 = " << sum1 << endl;
}
